<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>获得ECC的可用曲线名称列表</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.openssl-get-curve-names" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">openssl_get_curve_names</h1>
  <p class="verinfo">(PHP 7 &gt;= 7.1.0)</p><p class="refpurpose"><span class="refname">openssl_get_curve_names</span> &mdash; <span class="dc-title">获得ECC的可用曲线名称列表</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.openssl-get-curve-names-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>openssl_get_curve_names</strong></span>
    ( <span class="methodparam">void</span>
   ) : <span class="type">array</span></div>

  <p class="para rdfs-comment">
   获取用于公钥/私钥操作的椭圆曲线密码（ECC）中可用曲线名称的列表。两个最广泛的标准化/支持的曲线是<em class="emphasis">prime256v1</em> 
   (NIST P-256) 和 <em class="emphasis">secp384r1</em> (NIST P-384).
   <table class="doctable table">
    <caption><strong>AES, RSA, DSA 和 ECC 密钥长度近似等值</strong></caption>
    
     <thead>
      <tr>
       <th>AES Symmetric Keysize (Bits)</th>
       <th>RSA and DSA Keysize (Bits)</th>
       <th>ECC Keysize (Bits)</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>80</td>
       <td>1024</td>
       <td>160</td>
      </tr>

      <tr>
       <td>112</td>
       <td>2048</td>
       <td>224</td>
      </tr>

      <tr>
       <td>128</td>
       <td>3072</td>
       <td>256</td>
      </tr>

      <tr>
       <td>192</td>
       <td>7680</td>
       <td>384</td>
      </tr>

      <tr>
       <td>256</td>
       <td>15360</td>
       <td>512</td>
      </tr>

     </tbody>
    
   </table>

   <a href="http://dx.doi.org/10.6028/NIST.SP.800-57pt1r4" class="link external">&raquo;&nbsp;NIST 
   推荐使用的 ECC 曲线最少为 256 位</a>.  
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-function.openssl-get-curve-names-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.openssl-get-curve-names-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   一个包含可用曲线名称的<span class="type"><span class="type 数组">数组</span></span>。
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.openssl-get-curve-names-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="openssl-cipher-iv-length.example.basic">
    <p><strong>Example #1 <span class="function"><strong>openssl_get_curve_names()</strong></span> 范例</strong></p>
    <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$curve_names&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">openssl_get_curve_names</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$curve_names</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
    </div>

    <div class="example-contents"><p>以上例程的输出类似于：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Array
(
    [0] =&gt; secp112r1
    [1] =&gt; secp112r2
    [2] =&gt; secp128r1
    [3] =&gt; secp128r2
    [4] =&gt; secp160k1
    [5] =&gt; secp160r1
    [6] =&gt; secp160r2
    [7] =&gt; secp192k1
    [8] =&gt; secp224k1
    [9] =&gt; secp224r1
    [10] =&gt; secp256k1
    [11] =&gt; secp384r1
    [12] =&gt; secp521r1
    [13] =&gt; prime192v1
    [14] =&gt; prime192v2
    [15] =&gt; prime192v3
    [16] =&gt; prime239v1
    [17] =&gt; prime239v2
    [18] =&gt; prime239v3
    [19] =&gt; prime256v1
    [20] =&gt; sect113r1
    [21] =&gt; sect113r2
    [22] =&gt; sect131r1
    [23] =&gt; sect131r2
    [24] =&gt; sect163k1
    [25] =&gt; sect163r1
    [26] =&gt; sect163r2
    [27] =&gt; sect193r1
    [28] =&gt; sect193r2
    [29] =&gt; sect233k1
    [30] =&gt; sect233r1
    [31] =&gt; sect239k1
    [32] =&gt; sect283k1
    [33] =&gt; sect283r1
    [34] =&gt; sect409k1
    [35] =&gt; sect409r1
    [36] =&gt; sect571k1
    [37] =&gt; sect571r1
    [38] =&gt; c2pnb163v1
    [39] =&gt; c2pnb163v2
    [40] =&gt; c2pnb163v3
    [41] =&gt; c2pnb176v1
    [42] =&gt; c2tnb191v1
    [43] =&gt; c2tnb191v2
    [44] =&gt; c2tnb191v3
    [45] =&gt; c2pnb208w1
    [46] =&gt; c2tnb239v1
    [47] =&gt; c2tnb239v2
    [48] =&gt; c2tnb239v3
    [49] =&gt; c2pnb272w1
    [50] =&gt; c2pnb304w1
    [51] =&gt; c2tnb359v1
    [52] =&gt; c2pnb368w1
    [53] =&gt; c2tnb431r1
    [54] =&gt; wap-wsg-idm-ecid-wtls1
    [55] =&gt; wap-wsg-idm-ecid-wtls3
    [56] =&gt; wap-wsg-idm-ecid-wtls4
    [57] =&gt; wap-wsg-idm-ecid-wtls5
    [58] =&gt; wap-wsg-idm-ecid-wtls6
    [59] =&gt; wap-wsg-idm-ecid-wtls7
    [60] =&gt; wap-wsg-idm-ecid-wtls8
    [61] =&gt; wap-wsg-idm-ecid-wtls9
    [62] =&gt; wap-wsg-idm-ecid-wtls10
    [63] =&gt; wap-wsg-idm-ecid-wtls11
    [64] =&gt; wap-wsg-idm-ecid-wtls12
    [65] =&gt; Oakley-EC2N-3
    [66] =&gt; Oakley-EC2N-4
    [67] =&gt; brainpoolP160r1
    [68] =&gt; brainpoolP160t1
    [69] =&gt; brainpoolP192r1
    [70] =&gt; brainpoolP192t1
    [71] =&gt; brainpoolP224r1
    [72] =&gt; brainpoolP224t1
    [73] =&gt; brainpoolP256r1
    [74] =&gt; brainpoolP256t1
    [75] =&gt; brainpoolP320r1
    [76] =&gt; brainpoolP320t1
    [77] =&gt; brainpoolP384r1
    [78] =&gt; brainpoolP384t1
    [79] =&gt; brainpoolP512r1
    [80] =&gt; brainpoolP512t1
)
</pre></div>
    </div>
   </div>
  </p>
 </div>


</div></div></div></body></html>